import { defineStore } from 'pinia'
import { ref } from 'vue'
export const gameStores = defineStore(
    'gameStore',
    () => {
        const isMe = ref(false)
        const enemyDraw = ref({})
        const gameData = ref([])
        const win = ref(0) //0未结束，1赢，2输
        const time = ref(60)
        const InGame = ref(false)
        return {
            isMe,
            enemyDraw,
            gameData,
            win,
            time,
            InGame
        }
    },
    {
        persist: {
            paths: ['gameData', 'isMe', 'time', 'InGame']
        }
    }
)
